package com.totoro.springboot.jpa_batch.repository;

import com.totoro.springboot.jpa_batch.dao.BatchDao;
import com.totoro.springboot.jpa_batch.model.User;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by Niki on 2018/4/18 10:45
 */
public interface UserRepository extends PagingAndSortingRepository<User, Integer> {

    @Query(nativeQuery = true, value = "select * from lt_user where id in?1")
    List<User> findByIds(List<Integer> ids);
}
